package com.etc.service.impl;

import com.etc.dao.IndexMapper;
import com.etc.entity.Area;
import com.etc.entity.City;
import com.etc.entity.Province;
import com.etc.service.IndexService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IndexServiceImpl implements IndexService {
    @Autowired
    private IndexMapper dao;

    @Override
    public List<Province> getAllProvince() {
        return dao.queryAllProvince();

    }

    @Override
    public List<City> getCityByPid(String provinceId) {
        return dao.queryCityByPid(provinceId);
    }

    @Override
    public List<Area> getAreaByCid(String cityId) {
        return dao.queryAreaByCid(cityId);
    }
}
